<?php
	include(ROOTPATH .'include'. DS .'protect.php');
	include(ROOTPATH .'include'. DS .'initUser.php');
	include(ROOTPATH .'class'. DS .'mediaFile.class.php');
	
	$isUserExist = true ;
	
	
	$id		  = (int)getQuery('id');
	if( 0 == $id ) $id = $user -> id();
	$userInfo = $dbs -> select('SELECT * FROM `'. DB_PRE .'user` WHERE `id` = '. $id  );
	$userInfo = $userInfo[0];
	
	if( count($userInfo) == 0)
		$isUserExist = false;
	
	
	$isMyhome = false ;
	if( $userInfo['id'] == $user -> id() )
		$isMyhome = true ;
	
	
	$sql = 'SELECT count(*) as `counts` FROM `'. DB_PRE.'file` WHERE `user_id` ='. $id ;
	$lists = $dbs -> select($sql);
	$fileCount = $lists[0]['counts'];
	
?>